/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wo.cput.pattern.chainResponsibility;

/**
 *
 * @author Administrator
 */
public class EarthHandler extends PlanetHandler {

    public void handleRequest(PlanetEnum request) {
        if (request == PlanetEnum.EARTH) {
            System.out.println("EarthHandler handles " + request);
            System.out.println("Earth is comfortable .nn");
        } else {
            System.out.println("EarthHandler doesn't handle " + request);
            if (successor != null) {
                successor.handleRequest(request);
            }
        }
    }
}
